import { udp } from '@cscec/udp-ui';

export function getDataList(data = {}) {
  return udp.request.get({
    url: '/portal/myFunction/queryList',
    data,
  });
}

export function getRecentUseMeneList(data = {}) {
  return udp.request.get({
    url: '/portal/recentUseMenu/getRecentUseMeneList',
    data,
  });
}

export function saveOrUpdateBatch(data: any) {
  return udp.request.body({
    url: '/portal/myFunction/saveOrUpdateBatch',
    data: data.map(({ id, seq, useFlg }: any) => ({ id, seq, useFlg })),
  });
}
